import axios from 'axios';

let base = '/referee';


export const requestLogin = params => { return axios.post(`${base}/login`, params).then(res => res.data); };

export const getUserList = params => { return axios.get(`${base}/user/list`, { params: params }); };

export const getUserListPage = params => { return axios.get(`${base}/user/listpage`, { params: params }); };

export const getCaipanList = params => { return axios.get('/referee/re-user-info/rePage', { params:  params }); };

export const removeUser = (id, params) => { return axios.delete(`${base}/manage/re/${id}`, { params: params }); };
export const removeOrgs = (id, params) => { return axios.delete(`${base}/manage/org/${id}`, { params: params }); };

export const batchRemoveUser = params => { return axios.get(`${base}/user/batchremove`, { params: params }); };

export const editUser = params => { return axios.get(`${base}/user/edit`, { params: params }); };

export const addUser = params => { return axios.get(`${base}/user/add`, { params: params }); };

export const getComList = params => {return axios.get(`${base}/manage/com`, {params: params }); };
// 查询裁判员等级  类型0裁判员级别; 1赛事级别; 2裁判员职务; 
// referee/manage/dict/list?dictType=0&pageNum=1&pageSize=10
export const getReLeve = params => {return axios.get(`${base}/manage/dict/list?dictType=0&pageNum=1&pageSize=100`, {params: params }); };
export const getComLeve = params => {return axios.get(`${base}/manage/dict/list?dictType=1&pageNum=1&pageSize=100`, {params: params }); };
export const getPositionLeve = params => {return axios.get(`${base}/manage/dict/list?dictType=2&pageNum=1&pageSize=100`, {params: params }); };
export const getComRelist = params => {return  axios.get(`${base}/manage/com/re/list?pageNum=1&pageSize=100`,{params: params})}; 